import { IFeidaoAiBrowserComponent } from '@feidao/web/interfaces';
import init from '@feidao/web/framework/browser/dn/component';
import s from './s';
import nodejs from '@feidao/web/atom/browser/msg/nodejs';
import render from '@feidao/web/atom/browser/render/render';
import { query2obj, generate } from '@feidao/core/querystring';
const feidao = {};

const daoke = {
	async init(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
		console.log('zj-classroom-002 init b', args);
	},
	async ec01(fd: IFeidaoAiBrowserComponent, ...args: any[]) {
		console.log('zj-reality-picture-002 b init', args);

		// const fzno = args[0][0];
		// form_add = fd.data.node.querySelector('#form_add') as HTMLFormElement;
		// form_add.classroom_id.value = fd.data.params.classroom_id;
		// form_add.fzno.value = fzno;
		// const img = fd.data.node.querySelector('[data-feidao-id="img"]') as HTMLImageElement;
		// img.src = "";
		// fd.data.node.classList.remove('display-n');
		// base64Code = '';
		// can_add = true;
	}
};

const rules = {};

export default function main(url: string, query: any) {
	return init('zj-classroom-002', s, rules, feidao, daoke, url, query, { spaceid: 'flippedclass', systemid: '5991', refsystemid: '@refsystemid' });
}
